package com.groupe_A.metier;

import java.util.Set;

/**
 * @author mohssine
 * @version 1.0
 * @created 30-avr.-2013 14:44:56
 */
public class Filiere  {

	private Long idFiliere;
	private String libelle;
	public Set<Classe> classes;

	public Filiere(){

	}
	
	
	public Filiere(String libelle) {
		this.libelle = libelle;
	}



	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	public Set<Classe> getClasses() {
		return classes;
	}

	public void setClasses(Set<Classe> classes) {
		this.classes = classes;
	}

	public Long getIdFiliere() {
		return idFiliere;
	}

	public void setIdFiliere(Long idFiliere) {
		this.idFiliere = idFiliere;
	}


	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((classes == null) ? 0 : classes.hashCode());
		result = prime * result
				+ ((idFiliere == null) ? 0 : idFiliere.hashCode());
		result = prime * result + ((libelle == null) ? 0 : libelle.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Filiere other = (Filiere) obj;
		if (classes == null) {
			if (other.classes != null)
				return false;
		} else if (!classes.equals(other.classes))
			return false;
		if (idFiliere == null) {
			if (other.idFiliere != null)
				return false;
		} else if (!idFiliere.equals(other.idFiliere))
			return false;
		if (libelle == null) {
			if (other.libelle != null)
				return false;
		} else if (!libelle.equals(other.libelle))
			return false;
		return true;
	}


	@Override
	public String toString() {
		return "Filiere [idFiliere=" + idFiliere + ", libelle=" + libelle
				+ ", classes=" + classes + "]";
	}
	
	
}